<a class="single_image" href="#image-<{$image.img_id}>" title="<{$image.images_title}>" rel="lightbox" id="imglink-<{$image.img_id}>"
	data-maxheight="<{$image.max_height}>px" data-maxwidth="<{$image.max_width}>px" data-innerwidth="<{$image.display_width}>" data-innerheight="<{$image.display_height}>" >
	<img class="image-thumb" src="<{$image.thumb}>" alt="<{$image.images_title}>" title="<{$image.images_title}>" />
</a>

<div style="display: none">
	<div class="img_content" id="image-<{$image.img_id}>">
		<h3><{$image.images_title}></h3>
		<img class="image-full" src="<{$image.img}>" alt="<{$image.images_title}>" title="<{$image.images_title}>" />
		<div class="img_info">
			<{$smarty.const._MD_ALBUM_PUBLISHED_BY}>&nbsp;:&nbsp;<{$image.publisher.link}>&nbsp;
			(<a href="<{$album_real_url}><{$album_page}>?view=byPublisher&amp;uid=<{$image.publisher.uid}>" title="<{$smarty.const._MD_ALBUM_GET_BY_PUBLISHER}>&nbsp;<{$image.publisher.uname}>">
				<{$smarty.const._MD_ALBUM_GET_BY_PUBLISHER}>&nbsp;<{$image.publisher.uname}>
			</a>)<br />

			<{if $image.img_updated_date}>
				<{$smarty.const._MD_ALBUM_UPDATED_ON}>&nbsp;:&nbsp;<{$image.img_updated_date}>
			<{else}>
				<{$smarty.const._MD_ALBUM_PUBLISHED_ON}>&nbsp;:&nbsp;<{$image.img_published_date}>
			<{/if}>
			<{if $image.userCanEditAndDelete}>
				&nbsp;|&nbsp;<{$image.editItemLink}><{$image.deleteItemLink}>
			<{/if}>
			<{if $image.urllink}>
				<br /><{$image.urllink}>
			<{/if}>
		</div>

		<{if $image.labels}>
			<div class="label_links">
				<{foreach item=label from=$image.labels name=labels}>
					<a rel="label" class="label" href="<{$label.itemURL}>" title="<{$label.title}>"><{$label.title}></a>
				<{/foreach}>
			</div>
		<{/if}>

		<div class="img_desc" style="width: <{$image.display_width}>px" >
			<{$image.img_description}>
		</div>

		<{if $image.messages}>
			<div class="img_comments">
				<{foreach item=message from=$image.messages}>
					<{if $message.accessGranted}>
						<div class="img_comment <{if !$message.is_approved && $message.mycomment}>img_comment_waiting<{/if}> ">
							<img src="<{$message.user.avatar}>" width="32px" height="32px" alt="avatar" />
							<div class="comment_info">
								<div class="message_ulink">
									<{$message.user.link}>&nbsp;<span class="message_date">(<{$message.message_date}>)</span>
								</div>
							</div>
							<div class="album_clear_left"></div>
							<div class="message_body">
								<p><{$message.message_body}></p>
								<{if !$message.is_approved && $message.mycomment}>
									<span class="message_waiting"><p><{$smarty.const._MD_IMG_WAITING_APPROVAL}></p> </span>
								<{/if}>
							</div>
						</div>
					<{/if}>
				<{/foreach}>
			</div>
		<{/if}>
		<{if $icms_isuser && $use_image_comments}>
			<div class="img_comment_form">
				<{if $smarty.get.view == byLabels}>
					<form id="img_comment_form" action="<{$album_url}>submit.php?op=addmycomment" method="post">
				<{elseif $smarty.get.view == byPublisher}>
					<form id="img_comment_form" action="<{$album_url}>submit.php?op=addcommentByPublisher" method="post">
				<{else}>
					<form id="img_comment_form" action="<{$album_url}>submit.php?op=addcomment" method="post">
				<{/if}>
					<input type="hidden" name="img_id" value="<{$image.img_id}>" />
					<input type="hidden" name="op" value="addcomment" />

					<textarea name="img_comment" class="comment" cols="40" rows="4"></textarea>
					<input class="formButton" type="submit" value="<{$smarty.const._MD_ALBUM_SUBMIT}>" />
				</form>
				<{if $smarty.get.imglink}>
					<script type="text/javascript">
						$(document).ready(function(){
							// use colorbox for screenshots
							$('#imglink-<{$smarty.get.imglink}>').each(function(){
								var link = $(this), maxH = link.data("maxheight"), maxW = link.data("maxwidth"), innerH = link.data("innerheight"),innerW = link.data("innerwidth");
								link.colorbox({
									open: true,
									transition:'fade',
									speed:500,
									opacity: 0.9,
									photo: true,
									scalePhotos: true,
									slideshow: true,
									arrowKey: true,
									slideshowAuto: false,
									inline: true,
									maxWidth: maxW,
									maxHeight: maxH,
									innerWidth: innerW,
									innerHeight: innerH,
								});
							});
						});
					</script>
				<{/if}>
			</div>
		<{/if}>
	</div>
</div>